The present invention relates to a method, apparatus and computer program for aiding in making and editing drawings by using a computer. More particularly the present invention relates to a method, apparatus and computer program for aiding in the proper projection of a three-dimensional perspective view of an object conforming onto a two-dimensional perspective view of a background.
A perspective projection is a method of drawing which involves setting a vanishing point and drawing a three-dimensional figure of an object on a two-dimensional plane according to the vanishing point while giving the drawing some reality in terms of distance. In the field of computer graphics, drawing an object on a two-dimensional plane employs the above-described perspective projection so as to emphasize the reality of distances in a drawing.
As a way to support the generation of a perspective projection, a first conventional method is available which uses a computer and involves steps of automating or standardizing the technique used in the drawing and making of corrections on two-dimensional inputs from a user. To explain in more detail, this first conventional method, as shown in FIG. 11A, calculates, by computer, vanishing points 917, 918 from four guide lines 915 set by the user on a picture 910 of a background and, based on the vanishing points, aids in drawing a figure that conforms with a perspective projection of the background image. This method has been realized by some computer graphics software and is discussed in pages 22-31 of the Collection of Papers for 7th Nikograph Paper Contest.
A second conventional method of generating a perspective projection involves the user entering three-dimensional coordinates of an object and a camera angle. The camera angle includes parameters such as three-dimensional coordinates of an eye position, a three-dimensional vector representing a viewing direction, and a field of view angle. With the three-dimensional coordinates of an object and the camera angle determined, it is now possible to calculate how the object can be represented on the two-dimensional plane. This method has been realized in many three-dimensional Computer Aided Design (CAD) systems.
In the above-described first conventional method that standardizes the technique of drawing in a computer, the essential process is to calculate the vanishing points from arbitrary four guide lines. The positions of the vanishing points are calculated by determining the intersecting points between extensions of two facing guide lines. From the positions of the two vanishing points thus determined, the camera angle is calculated.
With the first conventional method, however, a perspective projection having three vanishing points cannot be handled. Further, as shown in FIG. 11B, very slight manipulation of one guide line 920 and 930 results in the vanishing point moving a great distance 921-1, 931-1, making the drawing process unstable. For images such as shown in the picture 910 of FIG. 11A, in particular, although the lines corresponding to 923 and 924 can be found, there is no clue related to 922 and 920 making the determination of vanishing points by this method difficult. When guide lines are set along the crest lines of an object or building as an aid for drawing, as shown in FIG. 11C, although the vanishing point 950 can be determined at all times, the vanishing point 944 which is obtained from 941 and 943 and the vanishing point 952 on the opposite side of the vanishing point 950 cannot be determined reliably. As a result, a perspective view as desired by the user cannot be drawn.
In the above-described second conventional method realized in three-dimensional CAD systems, the result of a perspective projection is determined by the three-dimensional coordinates of an object and the camera angle. It is, however, difficult for a user to figure out what the drawing he or she made will look like from this relationship, and many trials and errors must be performed before one can produce a desired perspective projection. While it is possible to make adjustments on three-dimensional coordinates, it is difficult to adjust the three-dimensional coordinates to produce the effect of appearing near or far.